Skip to content

fix: Dockerfile build without gcc#413

Open
mamirpanah wants to merge 3 commits intoojo-network:umeefrom
mamirpanah:umee
Open

fix: Dockerfile build without gcc#413
mamirpanah wants to merge 3 commits intoojo-network:umeefrom
mamirpanah:umee

Conversation

@mamirpanah
Copy link
Copy Markdown

Fix: Build with CGO_ENABLED=0 to ensure static linking with musl

This PR fixes an issue where the build fails due to missing references to *64 functions (e.g., fstat64, lseek64) when linking statically with musl. The problem occurs because gcc is used by default, which is incompatible with musl for static builds.

The fix adds CGO_ENABLED=0 to the build command, forcing Go to use the internal linker and build a fully static binary with musl. This resolves the linking errors and ensures a successful build on Alpine Linux.

Changes:

Added CGO_ENABLED=0 to the make build command in the Dockerfile.

@mamirpanah mamirpanah requested a review from a team as a code owner February 13, 2025 23:20
@mamirpanah
Copy link
Copy Markdown
Author

@adamewozniak Hi can you merge this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants